<?php
include("snoopy.class.php");
$snoopy = new Snoopy;
$snoopy->fetch("http://hi.baidu.com/luni");
$res = $snoopy->results;
$p1 = '<td align="center" valign="bottom">';
$p2 = 'target="_blank"';
$post = strpos($res, $p1);
$post_2 = strpos($res, $p2, $post);
$tmp = substr($res, $post+strlen($p1), $post_2 - $post - strlen($p1));
$q1 = '<a href="/';
$q2 = '"';
$name = substr($tmp, strpos($tmp, $q1) + strlen($q1), strpos($tmp, $q2) - strpos($tmp, $q1) - strlen($q1));
echo $name;
echo '<hr/>';
